home *** CD-ROM | disk | FTP | other *** search
- /************************************************************************************/
- /* MainWindowProc */
- /************************************************************************************/
-
- #include "MyHeaders.h"
-
- short MainWindowProc()
- {
- short MainWindRetCode = 0;
-
- windSub = 0; /* point to window record */
- SetPort (windTbl[windSub].windPtr); /* set as the grafPort */
-
- workPoint = myEvent.where;
- GlobalToLocal(&workPoint);
-
- switch (myEvent.what) /* how did I get here? */
- {
- case (mouseDown): /* MouseDown? */
- switch (myMouseWhere) /* What part of window? */
- {
- case (inContent): /* content region: */
- break;
-
- case (inDrag): /* drag region: */
- DragWindow (windTbl[windSub].windPtr,
- myEvent.where, &myDragRect);
- break;
-
- case (inGrow): /* grow region: */
- break; /* do nothing */
-
- case (inGoAway): /* goaway region: */
- break; /* no goaway region */
- }
-
- break;
-
- case(autoKey): /* beep for non command-key events */
- case(keyDown):
- SysBeep(0);
- break;
-
- case (activateEvt):
- j = (short) BitAnd(myEvent.modifiers, activeFlag);
-
- if (j) /* if activate... */
- {
- WorkRetCode = MenuUpdate(ProcMain); /* set the menus */
- }
- else /* if deactivate... */
- {
- }
- break;
- }
-
- return MainWindRetCode;
- }
-